package com.heer.gymnasium.module.coach.beans;

import com.heer.gymnasium.base.BaseBean;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by yan
 * on 2018/3/15
 */

public class CoachStatisticsBean extends BaseBean {
    private String username;
    private String distoryNum;
    private String count;

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getDistoryNum() {
        return distoryNum;
    }

    public void setDistoryNum(String distoryNum) {
        this.distoryNum = distoryNum;
    }

    public String getCount() {
        return count;
    }

    public void setCount(String count) {
        this.count = count;
    }

    public static List<CoachStatisticsBean> dataChange(List<StatisticsResponseBean.Item> itemList) {
        List<CoachStatisticsBean> list = new ArrayList<>();
        if (itemList != null) {
            for (int i = 0; i < itemList.size(); i++) {
                CoachStatisticsBean bean = new CoachStatisticsBean();
                StatisticsResponseBean.Item item = itemList.get(i);
                bean.setUsername(item.getNickname());
                bean.setDistoryNum(item.getDistory_num());
                bean.setCount(item.getUsed_num());
                list.add(bean);
            }
        }
        return list;
    }
}
